<ResourceDictionary
    xmlns="http://schemas.microsoft.com/client/2007" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:c="clr-namespace:Microsoft.Windows.Controls;assembly=CodeEditor">

    <Style TargetType="c:CodeEditor">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Grid x:Name="LayoutRoot" Background="White">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Canvas x:Name="TextLayer" Background="Transparent" />
                        <Canvas x:Name="SelectionLayer">
                            <Path x:Name="SelectionPath" Stroke="#a9a9a9">
                                <Path.Fill>
                                    <LinearGradientBrush>
                                        <LinearGradientBrush.GradientStops>
                                            <GradientStop Color="#30595959" Offset="0" />
                                            <GradientStop Color="#30c7c7c7" Offset="0.2" />
                                            <GradientStop Color="#30030303" Offset="1" />
                                        </LinearGradientBrush.GradientStops>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                            <Line x:Name="Caret" StrokeThickness="1" Stroke="Black" />
                        </Canvas>
                        <ScrollBar x:Name="VerticalScrollBar" Grid.Column="1" Orientation="Vertical" Width="20"/>
                        <ScrollBar x:Name="HorizontalScrollBar" Grid.Row="1" Orientation="Horizontal" Height="20" Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
